package com.service.impl;

import com.dao.RbacManagerDao;
import com.entity.RbacManager;
import com.service.RbacManagerService;

/**
 * 操作用户服务的实现类
 *
 * @author yyz
 * @date 2022/03/29
 */
public class RbacManagerServiceImpl implements RbacManagerService {

    private RbacManagerDao rbacManagerDao;

    /**
     * 设置用户管理dao层代理对象.
     *
     * @param rbacManagerDao 用户代理dao层代理对象
     */
    public void setRbacManagerDao(RbacManagerDao rbacManagerDao) {
        this.rbacManagerDao = rbacManagerDao;
    }

    @Override
    public int addOne(RbacManager rbacManager) {
        int i = rbacManagerDao.addOne(rbacManager);
        return i;
    }

    @Override
    public void deleteById(int id) {
        rbacManagerDao.deleteById(id);
    }

    @Override
    public void updateNameById(String name, int id) {
        rbacManagerDao.updateNameById(name,id);
    }

    @Override
    public RbacManager findOneById(int id) {
        RbacManager oneById = rbacManagerDao.findOneById(id);
        return oneById;
    }

}
